Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More accessible file download link for users who use a screen reader #3264

Merged
merged 7 commits into from
Dec 18, 2024

Conversation

Andrea-Guevara
Copy link
Contributor

@Andrea-Guevara Andrea-Guevara commented Aug 26, 2024

References

Description

Adding a more detailed description to the file download link using the “attr.aria-label” attribute.

Instructions for Reviewers

In the anchor of the component “file-download-link.component” the attribute “attr.aria-label” has been added to leave a more detailed description of the functionality of the link for users who make use of a screen reader.

List of changes in this PR:

  • The attribute “attr.aria-label” has been added
  • The translation key “file-download-link.download” has been created
  • The “dsoNameService” service has been used to fetch the bitstream name.
  • Finally, the translation key was concatenated with the “dsoNameService” service in the “attr.aria-label” attribute.

To reproduce:

  1. Visit an item using a screen reader.
  2. See list of Download Links at the right side of each file description.
  3. See that the screen reader announces the functionality of the link which is “download” plus the name of the file.

@tdonohue tdonohue added accessibility 1 APPROVAL pull request only requires a single approval to merge bug port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels Aug 27, 2024
@tdonohue
Copy link
Member

@Andrea-Guevara : This PR appears to be failing lint checks in the file-download-link.component.ts. See inline comments at https://github.com/DSpace/dspace-angular/pull/3264/files Please fix those lint errors so that the automated tests are able to run on this PR.

@Andrea-Guevara
Copy link
Contributor Author

Good morning @tdonohue
thank you very much for your comment :)
done!

@IgorBaptist4 IgorBaptist4 force-pushed the AccessibilityFileDownloadLinks branch from 41c1ccd to e43469f Compare September 4, 2024 20:31
Copy link

github-actions bot commented Nov 1, 2024

Hi @Andrea-Guevara,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@nwoodward
Copy link
Contributor

Hi @Andrea-Guevara. These changes look good on inspection, but I would like to test them to make sure. Could you fix the merge conflicts? They are in the translation files, so they will be quick. Then I will test the PR right away.

@Andrea-Guevara
Copy link
Contributor Author

@nwoodward Hello, good afternoon.
Sorry for the delay in replying, I've been away for a few days and couldn't reply before!

I've resolved the conflicts. I had some problems with blank spaces in the same translation key files, but these have also been resolved.

If you have any questions, I'd be happy to help.

Copy link
Contributor

@nwoodward nwoodward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Andrea-Guevara! I tested these changes, and they add the aria-label attribute to the Download file links.

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @Andrea-Guevara ! Code looks good to me, and I trust the testing of @nwoodward

@tdonohue tdonohue merged commit f16015a into DSpace:main Dec 18, 2024
13 checks passed
@tdonohue tdonohue added this to the 9.0 milestone Dec 18, 2024
@dspace-bot
Copy link
Contributor

Backport failed for dspace-7_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-7_x
git worktree add -d .worktree/backport-3264-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-3264-to-dspace-7_x
git switch --create backport-3264-to-dspace-7_x
git cherry-pick -x c02adead7467f414eefd7849704bf6579f41ef14 405a48378cfa2d598d6cb1ec8ddbec0cf17bb268 e43469f67f0bc91bdd62582cf480c07d07eb4bc4 77ea67c359e238dcd0ef57ca218c94c7a43ecdbd 3c41a4d8e6422e646253dda914cf8620903f76e1 0242fb2d04f733c65a4ca1e58f527f5d9dd00767

@dspace-bot
Copy link
Contributor

Backport failed for dspace-8_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-8_x
git worktree add -d .worktree/backport-3264-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-3264-to-dspace-8_x
git switch --create backport-3264-to-dspace-8_x
git cherry-pick -x c02adead7467f414eefd7849704bf6579f41ef14 405a48378cfa2d598d6cb1ec8ddbec0cf17bb268 e43469f67f0bc91bdd62582cf480c07d07eb4bc4 77ea67c359e238dcd0ef57ca218c94c7a43ecdbd 3c41a4d8e6422e646253dda914cf8620903f76e1 0242fb2d04f733c65a4ca1e58f527f5d9dd00767

tdonohue pushed a commit to tdonohue/dspace-angular that referenced this pull request Dec 18, 2024
…Space#3264)

* More accessible file download link for users who use a screen reader

* Refactoring implementation - More accessible file download link for users who use a screen reader

* Fixing import error

* Solving the spaces error

* Solving the spaces error

* Solving the spaces error in file pt-BR.json5

---------

Co-authored-by: andreaNeki <[email protected]>
tdonohue pushed a commit to tdonohue/dspace-angular that referenced this pull request Dec 18, 2024
…Space#3264)

* More accessible file download link for users who use a screen reader

* Refactoring implementation - More accessible file download link for users who use a screen reader

* Fixing import error

* Solving the spaces error

* Solving the spaces error

* Solving the spaces error in file pt-BR.json5

---------

Co-authored-by: andreaNeki <[email protected]>
@tdonohue
Copy link
Member

Manually ported to 8.x in #3762 and 7.x in #3763

@tdonohue tdonohue removed port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels Dec 18, 2024
tdonohue pushed a commit to tdonohue/dspace-angular that referenced this pull request Dec 18, 2024
…Space#3264)

* More accessible file download link for users who use a screen reader

* Refactoring implementation - More accessible file download link for users who use a screen reader

* Fixing import error

* Solving the spaces error

* Solving the spaces error

* Solving the spaces error in file pt-BR.json5

---------

Co-authored-by: andreaNeki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge accessibility bug
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Accessibility] Avoid repetition of identical link text on same page
4 participants